import { myLogger } from "../../logger/myLogger/mylogger.js"
import { IExcepHandler, EventCode } from "../eventHandler.js"

class ParseReqExceptionHandler implements IExcepHandler {
    public handle(logger: myLogger, code: EventCode, info: string, err: Error): void {
        if (code === EventCode.PAESE_REQ_ERROR) {
            logger.err(1, "parse req err .info:",info, err.name,err.message,err.stack as string)
            return
        }
        if (this.nextHandle != null) {
            this.nextHandle.handle(logger, code, info, err)
        }
    }
    nextHandle: IExcepHandler | null = null
}
export {ParseReqExceptionHandler}